package com.ruoyi.money.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 收支明细对象 sys_user_transaction
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
public class SysUserTransaction extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 交易记录ID */
    private Long transactionId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 来源用户ID */
    @Excel(name = "来源用户ID")
    private Long sourceUserId;

    /** 来源组织ID */
    @Excel(name = "来源组织ID")
    private Long sourceOrgId;

    /** 交易类型 */
    @Excel(name = "交易类型")
    private String transactionType;

    /** 收入类型 */
    @Excel(name = "收入类型")
    private String incomeType;

    /** 交易金额 */
    @Excel(name = "交易金额")
    private BigDecimal amount;

    /** 交易前余额 */
    @Excel(name = "交易前余额")
    private BigDecimal balanceBefore;

    /** 交易后余额 */
    @Excel(name = "交易后余额")
    private BigDecimal balanceAfter;

    /** 关联订单ID（可选） */
    @Excel(name = "关联订单ID", readConverterExp = "可=选")
    private Long orderId;

    /** 关联支付记录ID */
    @Excel(name = "关联支付记录ID")
    private Long paymentId;

    /** 交易描述 */
    @Excel(name = "交易描述")
    private String description;

    /** 交易状态 */
    @Excel(name = "交易状态")
    private String transactionStatus;

    public void setTransactionId(Long transactionId) 
    {
        this.transactionId = transactionId;
    }

    public Long getTransactionId() 
    {
        return transactionId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setSourceUserId(Long sourceUserId) 
    {
        this.sourceUserId = sourceUserId;
    }

    public Long getSourceUserId() 
    {
        return sourceUserId;
    }

    public void setSourceOrgId(Long sourceOrgId) 
    {
        this.sourceOrgId = sourceOrgId;
    }

    public Long getSourceOrgId() 
    {
        return sourceOrgId;
    }

    public void setTransactionType(String transactionType) 
    {
        this.transactionType = transactionType;
    }

    public String getTransactionType() 
    {
        return transactionType;
    }

    public void setIncomeType(String incomeType) 
    {
        this.incomeType = incomeType;
    }

    public String getIncomeType() 
    {
        return incomeType;
    }

    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }

    public void setBalanceBefore(BigDecimal balanceBefore) 
    {
        this.balanceBefore = balanceBefore;
    }

    public BigDecimal getBalanceBefore() 
    {
        return balanceBefore;
    }

    public void setBalanceAfter(BigDecimal balanceAfter) 
    {
        this.balanceAfter = balanceAfter;
    }

    public BigDecimal getBalanceAfter() 
    {
        return balanceAfter;
    }

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }

    public void setPaymentId(Long paymentId) 
    {
        this.paymentId = paymentId;
    }

    public Long getPaymentId() 
    {
        return paymentId;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setTransactionStatus(String transactionStatus) 
    {
        this.transactionStatus = transactionStatus;
    }

    public String getTransactionStatus() 
    {
        return transactionStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("transactionId", getTransactionId())
            .append("userId", getUserId())
            .append("sourceUserId", getSourceUserId())
            .append("sourceOrgId", getSourceOrgId())
            .append("transactionType", getTransactionType())
            .append("incomeType", getIncomeType())
            .append("amount", getAmount())
            .append("balanceBefore", getBalanceBefore())
            .append("balanceAfter", getBalanceAfter())
            .append("orderId", getOrderId())
            .append("paymentId", getPaymentId())
            .append("description", getDescription())
            .append("transactionStatus", getTransactionStatus())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
